package com.yunweiweishi.xuhuanpaltform.yuhuan_app.service.imp;

import com.yunweiweishi.xuhuanpaltform.yuhuan_app.dao.EquipmentDao;
import com.yunweiweishi.xuhuanpaltform.yuhuan_app.pojo.Equipment;
import com.yunweiweishi.xuhuanpaltform.yuhuan_app.service.EquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class EquipmentServiceImpl  implements EquipmentService {


    @Autowired
    private EquipmentDao equipmentDao;

    /**
     * 根据kks进行查询设备
     * @param kks
     * @return
     */
    @Override
    public Equipment findEquipmentByKks(String kks ) {

        return equipmentDao.findEquipmentByKks(kks);
    }

    @Override
    public Equipment findEquipmentByEquipmentName(String equipmentName) {
        return equipmentDao.findEquipmentByEquipmentName(equipmentName);
    }


    @Override
    public List<Equipment> FindAll() {
        return equipmentDao.findAll();
    }



    @Override
    public Equipment addEquipment(Equipment equipment) {
        return equipmentDao.save(equipment);
    }

    @Override
    public Equipment updateById(Equipment equipment) {
        return null;
    }

    @Override
    public void deleteById(Long id) {

    }
}
